package com.edu.study.base.lmsOrderOperateHistory.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.edu.study.base.lmsOrderOperateHistory.mapper.LmsOrderOperateHistoryMapper;
import com.edu.study.base.lmsOrderOperateHistory.domain.LmsOrderOperateHistory;
import com.edu.study.base.lmsOrderOperateHistory.service.ILmsOrderOperateHistoryService;

/**
 * LmsOrderOperateHistoryService业务层处理
 * 
 * @author zw
 * @date 2021-08-11
 */
@Service
//@DataSource(value = DataSourceType.SLAVE)
public class LmsOrderOperateHistoryServiceImpl implements ILmsOrderOperateHistoryService 
{
    @Autowired
    private LmsOrderOperateHistoryMapper lmsOrderOperateHistoryMapper;

    /**
     * 查询LmsOrderOperateHistory
     * 
     * @param id LmsOrderOperateHistoryID
     * @return LmsOrderOperateHistory
     */
    @Override
    public LmsOrderOperateHistory selectLmsOrderOperateHistoryById(Long id)
    {
        return lmsOrderOperateHistoryMapper.selectLmsOrderOperateHistoryById(id);
    }

    /**
     * 查询LmsOrderOperateHistory列表
     * 
     * @param lmsOrderOperateHistory LmsOrderOperateHistory
     * @return LmsOrderOperateHistory
     */
    @Override
    public List<LmsOrderOperateHistory> selectLmsOrderOperateHistoryList(LmsOrderOperateHistory lmsOrderOperateHistory)
    {
        return lmsOrderOperateHistoryMapper.selectLmsOrderOperateHistoryList(lmsOrderOperateHistory);
    }

    /**
     * 新增LmsOrderOperateHistory
     * 
     * @param lmsOrderOperateHistory LmsOrderOperateHistory
     * @return 结果
     */
    @Override
    public int insertLmsOrderOperateHistory(LmsOrderOperateHistory lmsOrderOperateHistory)
    {
        lmsOrderOperateHistory.setCreateTime(DateUtils.getNowDate());
        return lmsOrderOperateHistoryMapper.insertLmsOrderOperateHistory(lmsOrderOperateHistory);
    }

    /**
     * 修改LmsOrderOperateHistory
     * 
     * @param lmsOrderOperateHistory LmsOrderOperateHistory
     * @return 结果
     */
    @Override
    public int updateLmsOrderOperateHistory(LmsOrderOperateHistory lmsOrderOperateHistory)
    {
        return lmsOrderOperateHistoryMapper.updateLmsOrderOperateHistory(lmsOrderOperateHistory);
    }

    /**
     * 批量删除LmsOrderOperateHistory
     * 
     * @param ids 需要删除的LmsOrderOperateHistoryID
     * @return 结果
     */
    @Override
    public int deleteLmsOrderOperateHistoryByIds(Long[] ids)
    {
        return lmsOrderOperateHistoryMapper.deleteLmsOrderOperateHistoryByIds(ids);
    }

    /**
     * 删除LmsOrderOperateHistory信息
     * 
     * @param id LmsOrderOperateHistoryID
     * @return 结果
     */
    @Override
    public int deleteLmsOrderOperateHistoryById(Long id)
    {
        return lmsOrderOperateHistoryMapper.deleteLmsOrderOperateHistoryById(id);
    }
}
